import Vue from 'vue';
import Router from 'vue-router';
import Home from './pages/Home.vue';
import Sales from './pages/Sales.vue';
import Buy from './pages/Buy.vue';
import BuyDetail from './pages/BuyDetail.vue';
import CarAssess from './pages/CarAssess.vue';
import Login from './pages/Login.vue';
import ForgetPwd from './pages/forgetPwd.vue';
import Register from './pages/Register.vue';
import Information from './pages/Information.vue';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      meta: {
        keepAlive: false,
      }
    },
    {
      path: '/salesCar',
      name: 'sales',
      component: Sales,
      meta: {
        keepAlive: false,
      }
    },
    {
      path: '/buyCar',
      name: 'buy',
      component: Buy,
      meta: {
        keepAlive: true,
      }
    },
    {
      path: '/buyCar/buyDetail',
      name: 'buyDetail',
      component: BuyDetail,
      meta: {
        keepAlive: false,
      }
    },
    {
      path: '/carAssess',
      name: 'carAssess',
      component: CarAssess,
      meta: {
        keepAlive: false,
      }
    },
    {
      path: '/login',
      name: 'login',
      component: Login,
      meta: {
        keepAlive: false,
      }
    },
    {
      path: '/forgetPwd',
      name: 'forgetPwd',
      component: ForgetPwd,
      meta: {
        keepAlive: false,
      }
    },
    {
      path: '/register',
      name: 'register',
      component: Register,
      meta: {
        keepAlive: false,
      }
    },
    {
      path: '/information',
      name: 'information',
      component: Information,
      meta: {
        keepAlive: false,
      }
    },
  ],
});
